using System.Linq;
using System.Web.Mvc;
using DemoData;
using Hallenberg.SmartClient.Menu;

namespace MenuDemo.Controllers
{
    public class OrdersController : Controller
    {
        [MenuItem(MenuDefinition.MainMenu, MenuDefinition.OrdersIndex, "MenuOrdersTitle", SortIndex = 200)]
        [Authorize(Roles="Administrator")]
        public ActionResult Index()
        {
            return View(Repository.Orders.Get().Take(20).ToList());
        }
    }
}
